﻿@{
    ViewBag.Title = "Vision";
}
<h2>Examen de Vision</h2>
<div class="row-fluid">
    <div class="span4">
        @Html.Partial("Controles/_smallUserDetail")
    </div>
    <div class="span8" id="examenVisionContext">
        <div class="form-horizontal" data-bind="with: ExamenVision">
            <fieldset>
                <legend>Examen de Vision</legend>
                <div class="control-group">
                    <div class="control-label">
                        <label for="AgudezaVisualLejanaOI">
                            Agudeza Visual Lejana O.I
                        </label>
                    </div>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="AgudezaVisualLejanaOI" class="input-mini" name="AgudezaVisualLejanaOI"
                                data-bind="value: AgudezaVisualLejanaOI" /><span
                                    class="add-on">Rangos <= 20/40 (0.67)</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="AgudezaVisualLejanaOD">
                        Agudeza Visual Lejana O.D
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="AgudezaVisualLejanaOD" class="input-mini" name="AgudezaVisualLejanaOD"
                                data-bind="value: AgudezaVisualLejanaOD" /><span class="add-on">Rangos <= 20/40 (0.67)</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="AgudezaVisualCercana">
                        Agudeza Visual Cercana
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="AgudezaVisualCercana" class="input-mini" name="AgudezaVisualCercana"
                                data-bind="value: AgudezaVisualCercana" /><span class="add-on">Rangos <= 1M (0.48)</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="CampimetriaVertical">
                        Campimetria Vertical
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="CampimetriaVertical" class="input-medium" name="CampimetriaVertical"
                                data-bind="value: CampimetriaVertical" /><span class="add-on">Rangos <= 70 Grados</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="CampimetriaHorizontal">
                        Campimetria Horizontal
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="CampimetriaHorizontal" class="input-medium" name="CampimetriaHorizontal"
                                data-bind="value: CampimetriaHorizontal" /><span class="add-on">Rangos <= 120 Grados</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="Encandilamiento">
                        Encandilamiento
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="Encandilamiento" class="input-mini" name="Encandilamiento"
                                data-bind="value: Encandilamiento" /><span class="add-on">Rangos <= 5 Seg</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="Phorias">
                        Phorias
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <select id="Phorias" name="Phorias" class="input-mini" data-bind="options: ['SI', 'NO'], value: Phorias">
                            </select><span class="add-on">Rangos SI/NO</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="DiscriminacionesColores">
                        Discriminaciones de colores
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="DiscriminacionesColores" class="input-mini" name="DiscriminacionesColores"
                                data-bind="value: DiscriminacionesColores" /><span class="add-on">Rangos Policromia normal</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="SensibilidadContraste">
                        Sensibilidad al contraste
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="SensibilidadContraste" class="input-mini" name="SensibilidadContraste"
                                data-bind="value: SensibilidadContraste" /><span class="add-on">Rangos normal</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="VisionProfundidad">
                        Vision de profundidad
                    </label>
                    <div class="controls">
                        <div class="input-append">
                            <input type="text" id="VisionProfundidad" class="input-mini" name="VisionProfundidad"
                                data-bind="value: VisionProfundidad" /><span class="add-on">Rangos normal</span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="Observaciones">
                        Observaciones
                    </label>
                    <div class="controls">
                        <textarea rows="3" class="input-xlarge" id="Observaciones" name="Observaciones" data-bind="value: Observaciones"></textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="Recomendaciones">
                        Recomendaciones
                    </label>
                    <div class="controls">
                        <textarea rows="3" class="input-xlarge" id="Recomendaciones" name="Recomendaciones"
                            data-bind="value: Recomendaciones"></textarea>
                    </div>
                </div>
                <div>
                    <input id="btAsistente" type="button" class="btn btn-warning" href="#wizard" data-toggle="modal"
                        value="Asistente" />
                    <input class="btn btn-primary" type="submit" value="Guardar" data-bind="click: $parent.Guardar" />
                    @Html.ActionLink("Cancelar", "Index", "Examen", null, new { @class = "btn" })
                </div>
            </fieldset>
            <div class="modal hide" id="wizard">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal">
                        ×</button>
                    <h3>Asistente Vision</h3>
                </div>
                <div class="modal-body">
                    <p>
                        @Html.Partial("Controls/AsistenteVision")
                    </p>
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn" data-dismiss="modal">Cerrar</a>
                </div>
            </div>
        </div>

        <!--MODAL-->
        <div id="modalsaved" class="modal hide fade">
            <div class="modal-header">
                <h3>Registro</h3>
            </div>
            <div data-bind="html: Mensaje" class="modal-body">
            </div>
            <div class="modal-footer">
                <a href="#" class="btn" data-dismiss="modal" aria-hidden="true">Close</a>
            </div>
        </div>
        @Html.Partial("Controles/_errorModal")
    </div>
</div>

@section ViewScripts{
    <script src="@Url.Content("~/Scripts/views/examen/vision.js")" type="text/javascript"></script>
    <script>
        $(function () {
            startApp(@Html.Raw(Json.Encode(ViewBag.Model)));
        });
    </script>
}
